﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../Content/js/angular1.2.13.js"></script>



</head>
<body ng-app="app">
    <div ng-controller="ParentController">
        <div ng-controller="ChildController">
            <a ng-click="sayHello()">Say hello</a>
        </div>
        {{person}}
    </div>
    <script>
        var app = angular.module('app', []);
        app.controller('ParentController', function ($scope) {
            $scope.person = { greeted: false }; //
        });
        app.controller('ChildController', function ($scope) {
            $scope.sayHello = function () {
                $scope.person.name = 'Ari Lerner';
            };
        });

    </script>
</body>
</html>
